<template>
  <div>
    <!-- 导航栏 -->
    <van-grid :column-num="this.channelArr.length">
      <van-grid-item
        v-for="item in channelArr"
        :key="item.id"
        :icon="item.icon_url"
        :text="item.name"
        @click="tochannel(item.id)"
      />
    </van-grid>
  </div>
</template>
<script>

export default {
  name: "",
  props: ["channelArr"],
  data() {
    return {};
  },
  computed: {},
  components: {},
  methods: {
    tochannel(id) {
     this.$router.push({
        path: '/home/channel',
        query: {
          name:id,
        }
     })
    },
  },
  created() {
    console.log(this.channelArr);
  },
  mounted() {
    
  },
};
</script>
<style scoped></style>
